﻿#pragma once

#include <QDialog>
#include "ui_SetScriptDialogUI.h"
#include "qmessagebox.h"
#include "qevent.h"
#include "QMouseEvent"

class SetScriptWaitDialog;
class SetScriptLoopDialog;
class SetThermostatDialog;
class  SetPositionModeDialog;
class SetRateModeDialog;
class ScriptRunner;

class SetScriptDialog : public QDialog
{
  Q_OBJECT

private:
  Ui::SetScriptDialogUI ui;//ui类

  SetScriptWaitDialog* setScriptWaitDialog = Q_NULLPTR;
  SetScriptLoopDialog* setScriptLoopDialog = Q_NULLPTR;
  SetThermostatDialog* setThermostatDialog = Q_NULLPTR;
  SetPositionModeDialog* setPositionModeDialog = Q_NULLPTR;
  SetRateModeDialog* setRateModeDialog = Q_NULLPTR;
  ScriptRunner* scriptRunner = Q_NULLPTR;

public:
  SetScriptDialog(QWidget* parent = Q_NULLPTR);
  ~SetScriptDialog();

signals:

public slots:
  int exec();
  void accept();

  //对应每个按钮
private slots:
  void slot_openSetPositionModeDialog();
  void slot_openSetRateModeDialog();
  void slot_openSetThermostatDialog();
  void slot_openSetWaitTimeDialog();
  void slot_openSetLoopDialog();
  void slot_edit();

private:
  void initSignalsAndSlots();
  //geter and seter
public:
  SetScriptWaitDialog* getSetScriptWaitDialog();
  void setSetScriptWaitDialog(SetScriptWaitDialog* setScriptWaitDialog);
  SetScriptLoopDialog* getSetScriptLoopDialog();
  void setSetScriptLoopDialog(SetScriptLoopDialog* setScriptLoopDialog);
  SetThermostatDialog* getSetThermostatDialog();
  void setSetThermostatDialog(SetThermostatDialog* setThermostatDialog);
  SetPositionModeDialog* getSetPositionModeDialog();
  void setSetPositionModeDialog(SetPositionModeDialog* setPositionModeDialog);
  SetRateModeDialog* getSetRateModeDialog();
  void setSetRateModeDialog(SetRateModeDialog* setRateModeDialog);
  ScriptRunner* getScriptRunner();
  void setScriptRunner(ScriptRunner* scriptRunner);
};

